package com.webtest.verify;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @Description:
 * @Author: yangzhiwei
 * @Date: 2021/5/27 17:01
 */
public class VerifyIntEnumValidator implements ConstraintValidator<VerifyIntEnum,VerifyIntEnum> {
    @Override
    public boolean isValid(VerifyIntEnum verifyIntEnum, ConstraintValidatorContext constraintValidatorContext) {
        Class<?> e = verifyIntEnum.clas(); //为什么带一个？就可以使用 isEnum方法了
        if (e.isEnum()) {
            e.getClass();
        }
        return false;
    }
}
